import Layout from "@/layout/index.vue"
import { defineAsyncComponent } from "vue"

export default [
    {
        path:"/",
        redirect:"/home",
        component:Layout,
        children:[
            {
                path:"/home",
                component:defineAsyncComponent(() => import("@/views/home/Index.vue")),
                name:"home",
                meta:{
                    title:"首页",
                }
            },
            {
                path:"/user",
                component:defineAsyncComponent(() => import("@/views/User_Management/Index.vue")),
                name:"user",
                meta:{
                    title:"用户管理",
                },
                children:[
                    {
                        path:"/user/userlist",
                        component:defineAsyncComponent(() => import("@/views/User_Management/user/Index.vue")),
                        name:"userlist",
                        meta:{
                            title:"用户列表",
                        }
                    },
                    {
                        path:"/user/roleslist",
                        component:defineAsyncComponent(() => import("@/views/User_Management/roles/Index.vue")),
                        name:"roleslist",
                        meta:{
                            title:"角色列表",
                        }
                    },
                ]
            },
            {
                path:"/system",
                component:defineAsyncComponent(() => import("@/views/System_Management/Index.vue")),
                name:"system",
                meta:{
                    title:"系统管理",
                },
                children:[
                    {
                        path:"/system/menulist",
                        component:defineAsyncComponent(() => import("@/views/System_Management/menus/Index.vue")),
                        name:"menulist",
                        meta:{
                            title:"菜单列表",
                        }
                    }
                ]
            }
        ]
    },
    {
        path:"/login",
        component:import("@/views/login/Index.vue"),
        name:"login",
        meta:{
            title:"登录",
            icon:"Login",
        }
    },
]